import request from "@/utils/request";

export function getDepartments(){
  return request({
url:'/company/department'
  })
}

export function getEmployeesSimple(){
  return request({
url:'/sys/user/simple'
  })
}

export function addDepartments(data){
  return request({
url:'/company/department',
method:'POST',
data
  })
}

export function editDepartments(data){
  return request({
url:`/company/department/${data.id}`,
method:'PUT',
data
  })
}

export function getDepartmentsDetail(id){
  return request({
url:`/company/department/${id}`
  })
}

export function delDepartments(id){  
  return request({
   url:`/company/department/${id}`,
   method:'delete'
  })
}